#!/bin/bash
source ~/.bashrc

cd "$(dirname "$0")"
source ./bashrc

cd ..

###############
### start running
###############

exp=`basename $0`
task=$1

export FLAGS_fraction_of_gpu_memory_to_use=0.2
export CPU_NUM=1

# alias python_bin=paddle-dev
alias python_bin=paddle-dev-seq_pad

alias mainbody="python_bin train_gen_rl.py --exp=$exp \
        --train_mode=parallel \
        --model=UniRNN \
        --gamma=1.0 \
        --candidate_encode='' \
        --eval_exp=GE-eval-birnn \
        --eval_model=BiRNN"

if [ $task == "train" ]; then
    CUDA_VISIBLE_DEVICES=1 mainbody --task=train
fi

if [ $task == "evaluate" ]; then
    CUDA_VISIBLE_DEVICES=2 mainbody --task=evaluate
fi

